﻿using System;
using System.Collections;
using System.Web.UI;
using Pap.Web.Modules.Loan.ViewModel;
using Pap.Web.Utils;
using Utils.UIPermission;

namespace Pap.Web.Modules.Loan.Views
{
    /// <summary>
    /// 
    /// </summary>
    public partial class GridPrint : BasePage<GridPrintViewModel>
    {

        /// <summary>
        /// Gets the installments list.
        /// </summary>
        public IEnumerable InstallmentsList
        {
            get { return Session["InstallmentsList"] as IEnumerable; }
        }

        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (InstallmentsList != null)
                {
                    grv.DataSource = InstallmentsList;
                    grv.DataBind();
                }
            }
        }
    }
}
